home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / 2columns.mac < prev    next >
Encoding:
Text File  |  1992-08-26  |  830 b   |  36 lines

  1. %
  2. % This is the two column output format from Chapter 23 of the TeXbook.
  3. %
  4. %
  5. \hoffset=-.5in
  6. \newdimen\fullhsize
  7. \fullhsize=7.5in \hsize=3.6in
  8. \def\fullline{\hbox to \fullhsize}
  9. %
  10. \def\makeheadline{%
  11.  \vbox to 0pt{\vskip-22.5pt
  12.   \fullline{\vbox to8.5pt{}\the\headline}\vss}
  13.  \nointerlineskip
  14. }
  15. %
  16. \def\makefootline{%
  17.  \baselineskip=2\normalbaselineskip
  18.  \fullline{\the\footline}
  19. }
  20. %
  21. \let\lr=L \newbox\leftcolumn
  22. \output={\if L\lr
  23.     \global\setbox\leftcolumn=\columnbox \global\let\lr=R
  24.   \else \doubleformat \global\let\lr=L\fi
  25.   \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
  26. \def\doubleformat{\shipout\vbox{\makeheadline
  27.     \fullline{\box\leftcolumn\hfil\vrule\hfil\columnbox}
  28.     \makefootline}
  29.   \advancepageno}
  30. \def\columnbox{\leftline{\pagebody}}
  31. %
  32. \def\endtwocol{%
  33.  \vfill\supereject
  34.  \if R\lr \null\vfill\eject\fi
  35. }
  36.